#定义编译器
CC=arm-linux-gcc

#定义编译选项
CPPFLAGS = -I /home/fgy/tools/include -I /home/fgy/pnglib/include -I ./include
# #定义链接选项
# LDFLAGS  = -L /home/fgy/tools/lib -ljpeg -L /home/fgy/pnglib/lib -lz -lpng16 

#定义目标文件
TARGET=img

# #收集所有的.c文件
# SOURCES := $(wildcard src/*.c main.c)

all: $(TARGET)

# $(TARGET): $(SOURCES)
# 	$(CC) $(CPPFLAGS) $(SOURCES) -o $@ $(LDFLAGS)

# clean:
# 	rm -f $(TARGET)
SOURCES :=$(wildcard main.c)
LIBPATH =./src
LDFLAGS +=-L $(LIBPATH)
$(TARGET):$(SOURCES)
	$(CC) $(SOURCES) -o $@ $(LDFLAGS) $(CPPFLAGS)

makelib:
	$(MAKE) -C ./src